import request from '@/utils/request'
import { host } from '@/config'

export function getTree(params?: any) {
  return request({
    url: `${host}/rule/menu`,
    method: 'get',
    params,
  })
}

export function doAdd(data?: any) {
  return request({
    url: `${host}/rule/insert`,
    method: 'post',
    data,
  })
}

export function doEdit(data?: any) {
  return request({
    url: `${host}/rule/update`,
    method: 'post',
    data,
  })
}

export function doDelete(data?: any) {
  return request({
    url: `${host}/rule/delete`,
    method: 'post',
    data,
  })
}
